//常字符串指针大小理解64
#include <stdio.h>
#include <string.h>

int main()
{
    char* a = "abcdef";
    printf("sizeof\n");
    printf("%d\n", sizeof(a));//8
    printf("%d\n", sizeof(a + 1));//8
    printf("%d\n", sizeof(*a));//1
    printf("%d\n", sizeof(a[1]));//1
    printf("%d\n", sizeof(&a));//8
    printf("%d\n", sizeof(&a + 1));//8
    printf("%d\n", sizeof(&a[0] + 1));//8

    printf("strlen\n");
    printf("%d\n", strlen(a));//6
    printf("%d\n", strlen(a + 1));//5
    //printf("%d\n", strlen(*a));//对strlen来说，（）是地址，会导致野指针的问题
    //printf("%d\n", strlen(a[1]));//野指针
    printf("%d\n", strlen(&a));//随机值，strlen认为接收到的是字符串首地址
    printf("%d\n", strlen(&a + 1));//随机值
    printf("%d\n", strlen(&a[0] + 1));//5
    return 0;
}